package com.muyu.payment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.payment.domain.RechargeOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 充值订单Mapper接口
 *
 * @author muyu
 * @date 2025-01-27
 */
@Mapper
public interface RechargeOrderMapper extends BaseMapper<RechargeOrder> {

    /**
     * 根据订单号查询充值订单
     *
     * @param orderNo 订单号
     * @return 充值订单
     */
    RechargeOrder selectByOrderNo(@Param("orderNo") String orderNo);

    /**
     * 根据用户ID查询充值订单列表
     *
     * @param userId 用户ID
     * @param limit 限制条数
     * @return 充值订单列表
     */
    java.util.List<RechargeOrder> selectByUserId(@Param("userId") Long userId, @Param("limit") Integer limit);
}